#include "newdepotdialog.h"
#include "ui_newdepotdialog.h"

NewDepotDialog::NewDepotDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::NewDepotDialog)
{
    ui->setupUi(this);
}

NewDepotDialog::NewDepotDialog(DepotHandler *d, QWidget *parent):
    QDialog(parent),ui(new Ui::NewDepotDialog)
{
    ui->setupUi(this);
    this->d=d;
}

NewDepotDialog::~NewDepotDialog()
{
    delete ui;
}

/*create the new depot*/
void NewDepotDialog::accept()
{
    if(d!=NULL)
        d->addDepot(ui->depotNameEdit->text(),ui->depotLiquidityEdit->text(),"6.95");
}
